package com.iqiyi.pps.epg.core.service.channel;

import com.iqiyi.pps.epg.api.model.web.channel.TChannelConfig;
import com.iqiyi.pps.epg.api.model.web.channel.TChannelLogPage;
import com.iqiyi.pps.epg.api.model.web.channel.TChannelPage;
import com.iqiyi.pps.epg.api.model.web.channel.TChannelPcaPage;
import com.iqiyi.pps.epg.api.model.web.query.TFilter;
import com.iqiyi.pps.epg.api.model.web.query.TPage;
import com.iqiyi.pps.epg.core.model.channel.*;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;

import java.util.List;

public interface ChannelService {
    void saveBase(ChannelBase entity);

    void saveBoss(ChannelBoss entity);

    void saveTag(ChannelTag entity);

    void saveLog(ChannelLog entity);

    int saveConfig(ChannelConfig entity);

    void editConfig(ChannelConfig entity);

    boolean hasConfig(String type, int key);

    void deleteTag(ChannelTag entity);

    void updateChannelSync(long id, int isSync);

    public ChannelBase getChannelBase(long id);

    public ChannelBase getChannelByQipuId(long qipuId);

    public ChannelBoss getChannelBoss(long fatherId);

    boolean hasBroadcast(long channelId);

    boolean hasBroadcast(ChannelBase entity);

    public List<ChannelTag> getChannelTag(long fatherId);

    public TChannelPage getChanneList(TPage page, TFilter filter);

    List<ChannelBase> getChannelBaseList();

    List<ChannelBase> findChannelBaseList(List<Criterion> criterionList);

    List<ChannelLog> findChannelLogList(List<Criterion> criterionList, int maxResult, Order order);

    List<ChannelBase> getChannelBaseList(Integer isSync);

    List<String> getChannelBaseCodeList();

    public List<ChannelConfig> getAllConfigs();

    public List<TChannelConfig> transTConfigs(List<ChannelConfig> list);

    public List<ChannelConfig> getConfig(String type);

    public ChannelConfig getConfigData(String type, int key);

    public String getTagName(Long fatherId, Long id);

    public Long getQipuId(Long id);

    public Long getOldQipuId(Long id);

    public boolean checkName(Long fatherId, String name);

    public boolean checkUniversalCode(Long fatherId, String universalCode);

    public boolean delChannel(Long id);

    public List<ChannelLog> getChannelLogList(long fatherId);

    public TChannelLogPage getChannelLogList(TPage page, TFilter filter);

    public List<ChannelCode> getChannelCodeList(String key);

    public List<ChannelLog> getChannelLogUser(long fatherId);

    public void notifyHasPrograms(long channelId);

    public ChannelBase carouselTableNo(Integer carouselTableNo, int type, String channelId);

    public List<Long> fetchChannelList(String minTime, String maxTime);

    List<ChannelLog> getStreamErrorLogUser(long fatherId);

    public SearchSettingConfig getSearchConfig(long fatherId);

    public void saveSearchConfig(SearchSettingConfig dataConfig);

    public List<String> searchForLogUser(long channelId);

    public List<String> searchForUser(String type);

    public void sqlNotifyHasStream(long channelId);

    public List<ChannelBase> suggestChannelInfo(long channelQipuId, String channelName, int liveType);

    public List<String> searchForStreamErrorLogUser(long channelId);

    public List<String> searchForCarouselLogUser(long channelId);

    public List<ChannelLog> getCarouselLogUser(long fatherId);

    public TChannelPcaPage findChannelByCategoryId(String categoryId, String channelId, String channelName, TPage page);


    public List<ChannelConfig> findChannelConfigList(List<Criterion> criterionList, List<Order> orderList);

    public int updateDefaultLogoUrl( long channelId,String url );
}
